Skip to content

Conversation

@dinodork
Copy link

@dinodork dinodork commented Dec 4, 2025

A follow up fix (2969af5) for "Bug#36775910: Record buffer not set in index range scans" caused a performance regression by failing to respect the handler's recommendation to cap on number of rows in the record buffer (at the time of writing hard-coded to 100 for InnoDB). This caused a performance regression which is most pronounced when using a small LIMIT.

Fixed by re-introducing the cap.

Future work: As a future optimization, it would likely be beneficial to communicate the LIMIT value to the executor so that it could reduce the buffer size to that value - or not allocate a buffer at all in case of LIMIT 1.

…r` to query

`LIMIT`

A follow up fix (2969af5) for "Bug#36775910: Record buffer not set in index
range scans" caused a performance regression by failing to respect the handler's
recommendation to cap on number of rows in the record buffer (at the time of
writing hard-coded to 100 for InnoDB). This caused a performance regression
which is most pronounced when using a small LIMIT.

Fixed by re-introducing the cap.

Future work: It would likely be beneficial to communicate the LIMIT value to the
executor so that it could reduce the buffer size accordingly - or not allocate a
buffer at all in case of LIMIT 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant